<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Exceptions.html">
<link rel="next" href="Intermediate.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Commands" rel="Chapter" href="Commands.html">
<link title="Declaration" rel="Chapter" href="Declaration.html">
<link title="Exceptions" rel="Chapter" href="Exceptions.html">
<link title="Expressions" rel="Chapter" href="Expressions.html">
<link title="Intermediate" rel="Chapter" href="Intermediate.html">
<link title="Lexer" rel="Chapter" href="Lexer.html">
<link title="Main" rel="Chapter" href="Main.html">
<link title="Parser" rel="Chapter" href="Parser.html">
<link title="Print" rel="Chapter" href="Print.html">
<link title="Print_syntaxtree" rel="Chapter" href="Print_syntaxtree.html">
<link title="Semantic" rel="Chapter" href="Semantic.html">
<link title="Subroutines" rel="Chapter" href="Subroutines.html">
<link title="Syntaxtree" rel="Chapter" href="Syntaxtree.html">
<link title="Target" rel="Chapter" href="Target.html"><title>Expressions</title>
</head>
<body>
<div class="navbar"><a href="Exceptions.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="Intermediate.html">Next</a>
</div>
<center><h1>Module <a href="type_Expressions.html">Expressions</a></h1></center>
<br>
<pre><span class="keyword">module</span> Expressions: <code class="code">sig</code> <a href="Expressions.html">..</a> <code class="code">end</code></pre>Here are all the functions to generate the intermediate code for the arithmetical and boolean expressions<br>
<hr width="100%">
<br>
Here are all the functions to generate the intermediate code for the arithmetical and boolean expressions<br>
<pre><span class="keyword">val</span> <a name="VALgenParam"></a><a href="code_VALExpressions.genParam.html">genParam</a> : <code class="type"><a href="Syntaxtree.html#TYPEaexp">Syntaxtree.aexp</a> list -><br>       <a href="Intermediate.html#TYPEdec_table">Intermediate.dec_table</a> -><br>       <a href="Intermediate.html#TYPEproc_table">Intermediate.proc_table</a> -> <a href="Intermediate.intermediateCode.html">Intermediate.intermediateCode</a> -> unit</code></pre><div class="info">
Creates the instructions for the parameters before a call<br>
</div>
<div class="param_info"><code class="code">plist</code> : The parameter list</div>
<div class="param_info"><code class="code">dect</code> : The declarations table</div>
<div class="param_info"><code class="code">proct</code> : The procedures table</div>
<div class="param_info"><code class="code">ic</code> : The instance of the intermediateCode instance</div>
<pre><span class="keyword">val</span> <a name="VALgenArithmetical"></a><a href="code_VALExpressions.genArithmetical.html">genArithmetical</a> : <code class="type"><a href="Syntaxtree.html#TYPEaexp">Syntaxtree.aexp</a> -><br>       <a href="Intermediate.html#TYPEdec_table">Intermediate.dec_table</a> -><br>       <a href="Intermediate.html#TYPEproc_table">Intermediate.proc_table</a> -><br>       <a href="Intermediate.intermediateCode.html">Intermediate.intermediateCode</a> -> <a href="Intermediate.html#TYPEelement">Intermediate.element</a></code></pre><div class="info">
Creates the instruction for the arithmetical expressions<br>
<b>Returns</b> An element, which can be a Value, an Offset or a temporary register<br>
</div>
<div class="param_info"><code class="code">a</code> : The arithmetical expression to analize</div>
<div class="param_info"><code class="code">dect</code> : The declarations table</div>
<div class="param_info"><code class="code">proct</code> : The procedures table</div>
<div class="param_info"><code class="code">ic</code> : The intermediateCode class instance</div>
<pre><span class="keyword">val</span> <a name="VALgenBoolean"></a><a href="code_VALExpressions.genBoolean.html">genBoolean</a> : <code class="type"><a href="Syntaxtree.html#TYPEbexp">Syntaxtree.bexp</a> -><br>       <a href="Intermediate.html#TYPEdec_table">Intermediate.dec_table</a> -><br>       <a href="Intermediate.html#TYPEproc_table">Intermediate.proc_table</a> -><br>       <a href="Intermediate.intermediateCode.html">Intermediate.intermediateCode</a> -> <a href="Intermediate.html#TYPEelement">Intermediate.element</a></code></pre><div class="info">
Creates the instruction for the boolean expressions<br>
<b>Returns</b> An element, which can be a Value or a temporary register<br>
</div>
<div class="param_info"><code class="code">a</code> : The boolean expression to analize</div>
<div class="param_info"><code class="code">dect</code> : The declarations table</div>
<div class="param_info"><code class="code">proct</code> : The procedures table</div>
<div class="param_info"><code class="code">ic</code> : The intermediateCode class instance</div>
</body></html>